<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>lib/constants.js - Documentation</title>

    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="LabelElement.html">LabelElement</a></li><li><a href="module-labeling-utils-GridPolygon.html">GridPolygon</a></li><li><a href="module-mgrs-utils-NonPolarGridZone.html">NonPolarGridZone</a><ul class='methods'><li data-type='method'><a href="module-mgrs-utils-NonPolarGridZone.html#toPolygon">toPolygon</a></li><li data-type='method'><a href="module-mgrs-utils-NonPolarGridZone.html#toPolyline">toPolyline</a></li></ul></li><li><a href="module-mgrs-utils-VisibleGridZone.html">VisibleGridZone</a><ul class='methods'><li data-type='method'><a href="module-mgrs-utils-VisibleGridZone.html#getCenterLabel">getCenterLabel</a></li><li data-type='method'><a href="module-mgrs-utils-VisibleGridZone.html#getLabels">getLabels</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-constants.html">constants</a></li><li><a href="module-geometry-utils.html">geometry-utils</a><ul class='methods'><li data-type='method'><a href="module-geometry-utils.html#~extentToPolygon">extentToPolygon</a></li><li data-type='method'><a href="module-geometry-utils.html#~pointToGeographic">pointToGeographic</a></li><li data-type='method'><a href="module-geometry-utils.html#~polygonToPolyline">polygonToPolyline</a></li><li data-type='method'><a href="module-geometry-utils.html#~toGeographic">toGeographic</a></li><li data-type='method'><a href="module-geometry-utils.html#~toWebMercator">toWebMercator</a></li></ul></li><li><a href="module-labeling-utils.html">labeling-utils</a><ul class='methods'><li data-type='method'><a href="module-labeling-utils.html#~distanceFromMapEdge">distanceFromMapEdge</a></li><li data-type='method'><a href="module-labeling-utils.html#~getScreenSize">getScreenSize</a></li><li data-type='method'><a href="module-labeling-utils.html#~getWidthOfText">getWidthOfText</a></li><li data-type='method'><a href="module-labeling-utils.html#~padZero">padZero</a></li><li data-type='method'><a href="module-labeling-utils.html#~screenDistanceBetweenPoints">screenDistanceBetweenPoints</a></li></ul></li><li><a href="module-mgrs-utils.html">mgrs-utils</a><ul class='methods'><li data-type='method'><a href="module-mgrs-utils.html#~getInterval">getInterval</a></li><li data-type='method'><a href="module-mgrs-utils.html#~handle100kGrids">handle100kGrids</a></li><li data-type='method'><a href="module-mgrs-utils.html#~handleIntervals">handleIntervals</a></li><li data-type='method'><a href="module-mgrs-utils.html#~handleZonePolygon">handleZonePolygon</a></li><li data-type='method'><a href="module-mgrs-utils.html#~processZonePolygons">processZonePolygons</a></li><li data-type='method'><a href="module-mgrs-utils.html#~zonesFromExtent">zonesFromExtent</a></li></ul></li></ul><h3>Externals</h3><ul><li><a href="external-Color.html">Color</a></li><li><a href="external-Extent.html">Extent</a></li><li><a href="external-Font.html">Font</a></li><li><a href="external-Geometry.html">Geometry</a></li><li><a href="external-Graphic.html">Graphic</a></li><li><a href="external-GraphicsLayer.html">GraphicsLayer</a></li><li><a href="external-Map.html">Map</a></li><li><a href="external-Point.html">Point</a></li><li><a href="external-Polygon.html">Polygon</a></li><li><a href="external-Polyline.html">Polyline</a></li><li><a href="external-SpatialReference.html">SpatialReference</a></li><li><a href="external-TextSymbol.html">TextSymbol</a></li></ul>
</nav>

<div id="main">
    
    <h1 class="page-title">lib/constants.js</h1>
    

    



    
    <section>
        <article>
            <pre class="prettyprint source linenums"><code>/**
 *  @fileOverview Contains constants used by GridOverlay widgets.
 *  @author Esri
 */

/**
 *  @module constants
 *  @description Contains constants used by GridOverlay widgets.
 *  @author Esri
 */

define([], function() {

  /** @namespace */
  return {

    /**
     * MGRS zones are 6 degrees wide
     * @instance
     * @default
     */
    "ZONE_WIDTH_DEGREES": 6,

    /**
     * MGRS zones are 8 degrees tall
     * @instance
     * @default
     */
    "ZONE_HEIGHT_DEGREES": 8,

    /**
     * MGRS is only valid between -80 -> 84 degrees latitude
     * @instance
     * @default
     */
    "MIN_MGRS_LATITUDE": -80,

    /**
     * MGRS is only valid between -80 -> 84 degrees latitude
     * @instance
     * @default
     */
    "MAX_MGRS_LATITUDE": 84,

    /**
     * Used to convert 180 to a slightly smaller number since it causes problems when drawing graphics
     * @instance
     * @default
     */
    "POSITIVE_180": 179.99999999,

    /**
     * Used to convert -180 to a slightly larger number since it causes problems when drawing graphics
     * @instance
     * @default
     */
    "NEGATIVE_180": -179.99999999,

    /**
     * The westernmost, normalized Geographic longitude (i.e. the International Date Line; longitude 180°W)
     * @instance
     * @default
     */
    "WEST_GEOGRAPHIC_LIMIT": -180,

    /**
     * The easternmost, normalized Geographic longitude (i.e. the International Date Line; longitude 180°E)
     * @instance
     * @default
     */
    "EAST_GEOGRAPHIC_LIMIT": 180,

    /**
     * The westernmost, normalized Web Mercator x (i.e. the International Date Line; longitude 180°W)
     * @instance
     * @default
     */

    /**
     * The entire span of the X axis in Geographics degrees (360° of longitude)
     * @instance
     * @default
     */
    "GEOGRAPHIC_360": 360,

    "WEST_WEBMERCATOR_LIMIT": -20037508.342789244,

    /**
     * The easternmost, normalized Web Mercator x (i.e. the International Date Line; longitude 180°E)
     * @instance
     * @default
     */
    "EAST_WEBMERCATOR_LIMIT": 20037508.342789244,

    /**
     * The entire span of the X axis in web mercator units (equivalent to 360° of longitude)
     * @instance
     * @default
     */
    "WEBMERCATOR_360": 40075016.68557849,

    /**
     * Defined by the equation: 360° / (2 * Math.PI)
     * @instance
     * @default
     */
    "DEGREES_PER_RADIAN": 57.29577951308232,

    /**
     * Defined by the equation: (2 * Math.PI) / 360°
     * @instance
     * @default
     */
    "RADIANS_PER_DEGREE": 0.017453292519943295,

    /**
     * The equatorial radius of the earth, using reference earth model WGS84
     * @instance
     * @default
     */
    "WGS84_EQUATORIAL_RADIUS": 6378137.0,

    /**
     * One half of the WGS84_EQUATORIAL_RADIUS, used to slightly speed up conversion to web mercator
     * @instance
     * @default
     */
    "WGS84_HALF_EQUATORIAL_RADIUS": 3189068.5,

    /**
     * One half of Math.PI, used to slightly speed up conversion to web mercator
     * @instance
     * @default
     */
    "HALF_PI": 1.5707963267948966,

  };
});
</code></pre>
        </article>
    </section>




</div>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>
